Skip to content

Conversation

@mosleyit
Copy link
Contributor

@mosleyit mosleyit commented Mar 28, 2025

…lasses

This refactoring improves code organization by:

  • Creating a ToolUseHandler abstract base class
  • Implementing a ToolUseHandlerFactory for handler instantiation
  • Moving each tool's logic to its own handler class
  • Reducing complexity in the Cline class
  • Improving maintainability and testability
  • Making it easier to add new tools in the future

Part of the larger effort to break down the monolithic Cline class into smaller, more focused components following SOLID principles.

Context

Moving tool handlers out of cline.ts

Implementation

Moved tools to src/core/tool-handlers/tools/

Screenshots

N/A

How to Test

Added additional unit tests as well as prompted Claude to test all tools and maintain and markdown with user feedback to confirm that each tool worked if it could not verify itself. Additionally I have not been able to test MCP as I do not user them.

Get in Touch

@mosleyit also on discord channel

…lasses

This refactoring improves code organization by:
- Creating a ToolUseHandler abstract base class
- Implementing a ToolUseHandlerFactory for handler instantiation
- Moving each tool's logic to its own handler class
- Reducing complexity in the Cline class
- Improving maintainability and testability
- Making it easier to add new tools in the future

Part of the larger effort to break down the monolithic Cline class
into smaller, more focused components following SOLID principles.
@changeset-bot
Copy link

changeset-bot bot commented Mar 28, 2025

⚠️ No Changeset found

Latest commit: 36704c9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@KJ7LNW
Copy link
Contributor

KJ7LNW commented Mar 29, 2025

@mrubens @cte @hannesrudolph:

Please fix issue #2086 before merging.

@mrubens
Copy link
Collaborator

mrubens commented Mar 30, 2025

@mrubens @cte @hannesrudolph:

Please fix issue #2086 before merging.

I would still like to stick with squash merges in general, but think that more/smaller PRs are more aligned with that approach. I'll try to break down these changes into a PR per tool.

@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Apr 1, 2025
monotykamary pushed a commit to monotykamary/Roo-Code that referenced this pull request Apr 4, 2025
* Add tests for TerminalProcess.ts

* Add missing Sinon mocking

* Test fixes

* More fixes

* Use sinon sandbox

* Add more tests, including real integration ones

* Revert lock changes

---------

Co-authored-by: Saoud Rizwan <[email protected]>
@hannesrudolph hannesrudolph moved this from PR [Pre Approval Review] to PR [Draft/WIP] in Roo Code Roadmap May 10, 2025
@hannesrudolph hannesrudolph moved this from New to PR [Draft/WIP] in Roo Code Roadmap May 20, 2025
@hannesrudolph hannesrudolph moved this from PR [Draft / In Progress] to TEMP in Roo Code Roadmap May 26, 2025
@daniel-lxs
Copy link
Member

Hey @mosleyit,
Thank you for your contribution, We noticed this PR is stale and will be closed. If you plan to revisit this, please create an issue first as required by our issue-first approach before opening a new PR.

@daniel-lxs daniel-lxs closed this May 26, 2025
@github-project-automation github-project-automation bot moved this from TEMP to Done in Roo Code Roadmap May 26, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft/WIP] to Done in Roo Code Roadmap May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants